package com.wuming.caiwu.service;


import com.wuming.caiwu.core.BusinessException;
import com.wuming.caiwu.model.QsgBanner;

import java.util.List;

/**
 * banner服务
 * Created by hanfei on 16/4/19.
 */
public interface QsgBannerService {
    /**
     * 保存banner信息
     *
     * @param banner banner信息
     * @throws BusinessException
     */
    void saveBanner(QsgBanner banner) throws BusinessException;

    /**
     * 更新banner信息
     *
     * @param banner banner信息
     * @throws BusinessException
     */
    void modifyBanner(QsgBanner banner) throws BusinessException;

    /**
     * 根据ID查询banner
     * @param id
     * @return banner
     * @throws BusinessException
     */
    QsgBanner getBannerById(Long id) throws BusinessException;

    /**
     * 根据ID删除banner
     * @param id
     * @throws BusinessException
     */
    void removeBannerById(Long id) throws BusinessException;

    /**
     * 分页查询banner列表
     *
     * @param pageIndex     当前页
     * @param pageSize      每页条数
     * @return banner列表
     * @throws BusinessException
     */
    List<QsgBanner> getBannerByPage(int pageIndex, int pageSize) throws BusinessException;

    /**
     * 查询总的banner数
     *
     * @return banner总数
     * @throws BusinessException
     */
    int getTotal() throws BusinessException;

}
